package com.ruoyi.mall.product.domain.service.impl;

import java.util.List;

import com.ruoyi.mall.product.domain.service.IPmsSpuDescService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.product.domain.repository.PmsSpuDescMapper;
import com.ruoyi.mall.product.domain.entity.PmsSpuDesc;

/**
 * spu信息介绍Service业务层处理
 *
 * @author zhangqishu
 * @date 2022-05-25
 */
@Service
public class PmsSpuDescServiceImpl implements IPmsSpuDescService
{
    @Autowired
    private PmsSpuDescMapper pmsSpuDescMapper;

    /**
     * 查询spu信息介绍
     *
     * @param spuId spu信息介绍主键
     * @return spu信息介绍
     */
    @Override
    public PmsSpuDesc selectPmsSpuDescBySpuId(Long spuId)
    {
        return pmsSpuDescMapper.selectPmsSpuDescBySpuId(spuId);
    }

    /**
     * 查询spu信息介绍列表
     *
     * @param pmsSpuDesc spu信息介绍
     * @return spu信息介绍
     */
    @Override
    public List<PmsSpuDesc> selectPmsSpuDescList(PmsSpuDesc pmsSpuDesc)
    {
        return pmsSpuDescMapper.selectPmsSpuDescList(pmsSpuDesc);
    }

    /**
     * 新增spu信息介绍
     *
     * @param pmsSpuDesc spu信息介绍
     * @return 结果
     */
    @Override
    public int insertPmsSpuDesc(PmsSpuDesc pmsSpuDesc)
    {
        return pmsSpuDescMapper.insertPmsSpuDesc(pmsSpuDesc);
    }

    /**
     * 修改spu信息介绍
     *
     * @param pmsSpuDesc spu信息介绍
     * @return 结果
     */
    @Override
    public int updatePmsSpuDesc(PmsSpuDesc pmsSpuDesc)
    {
        return pmsSpuDescMapper.updatePmsSpuDesc(pmsSpuDesc);
    }

    /**
     * 批量删除spu信息介绍
     *
     * @param spuIds 需要删除的spu信息介绍主键
     * @return 结果
     */
    @Override
    public int deletePmsSpuDescBySpuIds(Long[] spuIds)
    {
        return pmsSpuDescMapper.deletePmsSpuDescBySpuIds(spuIds);
    }

    /**
     * 删除spu信息介绍信息
     *
     * @param spuId spu信息介绍主键
     * @return 结果
     */
    @Override
    public int deletePmsSpuDescBySpuId(Long spuId)
    {
        return pmsSpuDescMapper.deletePmsSpuDescBySpuId(spuId);
    }
}
